<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Order Confirmation</title>
    <script type="text/javascript" th:src="@{/js/Order.js}"></script>
</head>
<body>
<div id="BackLink">
    <a th:href="@{/mainForm}">Return to Main Menu</a>
</div>

<div id="Catalog">
    <p>Please confirm the information below and then press continue...</p>

    <form th:action="@{/newOrder(confirmed=true)}" method="post">
        <table>
            <tr>
                <th align="center" colspan="2">
                    <font size="4"><b>Order</b></font><br/>
                    <font size="3">
                        <b th:text="${#dates.format(session.order.orderdate, 'yyyy/MM/dd HH:mm:ss')}"></b>
                    </font>
                </th>
            </tr>

            <tr>
                <th colspan="2">Billing Address</th>
            </tr>
            <tr>
                <td>First name:</td>
                <td th:text="${session.order.billtofirstname}"></td>
            </tr>
            <tr>
                <td>Last name:</td>
                <td th:text="${session.order.billtolastname}"></td>
            </tr>
            <tr>
                <td>Address 1:</td>
                <td th:text="${session.order.billaddr1}"></td>
            </tr>
            <tr>
                <td>Address 2:</td>
                <td th:text="${session.order.billaddr2}"></td>
            </tr>
            <tr>
                <td>City:</td>
                <td th:text="${session.order.billcity}"></td>
            </tr>
            <tr>
                <td>State:</td>
                <td th:text="${session.order.billstate}"></td>
            </tr>
            <tr>
                <td>Zip:</td>
                <td th:text="${session.order.billzip}"></td>
            </tr>
            <tr>
                <td>Country:</td>
                <td th:text="${session.order.billcountry}"></td>
            </tr>

            <tr>
                <th colspan="2">Shipping Address</th>
            </tr>
            <tr>
                <td>First name:</td>
                <td th:text="${session.order.shiptofirstname}"></td>
            </tr>
            <tr>
                <td>Last name:</td>
                <td th:text="${session.order.shiptolastname}"></td>
            </tr>
            <tr>
                <td>Address 1:</td>
                <td th:text="${session.order.shipaddr1}"></td>
            </tr>
            <tr>
                <td>Address 2:</td>
                <td th:text="${session.order.shipaddr2}"></td>
            </tr>
            <tr>
                <td>City:</td>
                <td th:text="${session.order.shipcity}"></td>
            </tr>
            <tr>
                <td>State:</td>
                <td th:text="${session.order.shipstate}"></td>
            </tr>
            <tr>
                <td>Zip:</td>
                <td th:text="${session.order.shipzip}"></td>
            </tr>
            <tr>
                <td>Country:</td>
                <td th:text="${session.order.shipcountry}"></td>
            </tr>
        </table>
        <input type="button" name="newOrder" value="Confirm" onclick="jump2vieworder();" />
    </form>
</div>
</body>
</html>